#app {

  .main-container {
    min-height: 100%;
    transition: margin-left .28s;
    margin-left: $base-sidebar-width;
    position: relative;
  }

  .sidebarHide {
    margin-left: 0!important;
  }

  .sidebar-container {
    -webkit-transition: width .28s;
    transition: width 0.28s;
    width: $base-sidebar-width !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    height: 100%;
    position: fixed;
    font-size: 0px;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
    border-right: 1px solid rgba(24, 144, 255, 0.15);
    backdrop-filter: blur(10px);

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, rgba(24, 144, 255, 0.02) 0%, transparent 100%);
      pointer-events: none;
    }

    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }

    .el-scrollbar {
      height: 100%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 50px);
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: inline-block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 16px;
      font-size: 18px;
      transition: all 0.3s ease;
    }

    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
      background: transparent;
    }

    .el-menu-item, .el-submenu__title {
      overflow: hidden !important;
      text-overflow: ellipsis !important;
      white-space: nowrap !important;
      height: 56px !important;
      line-height: 56px !important;
      margin: 4px 12px !important;
      border-radius: 12px !important;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
      position: relative !important;
      overflow: hidden !important;
      background: rgba(255, 255, 255, 0.8) !important;
      border: 1px solid rgba(24, 144, 255, 0.05) !important;
      
      &:hover {
        background: linear-gradient(135deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.06) 100%) !important;
        color: #1890ff !important;
        transform: translateX(4px) !important;
        box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15) !important;
        
        .svg-icon {
          transform: scale(1.1) !important;
          color: #1890ff !important;
        }
      }
      
      &.is-active {
        background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%) !important;
        color: #ffffff !important;
        box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3) !important;
        
        .svg-icon {
          color: #ffffff !important;
        }
        
        &::before {
          content: '' !important;
          position: absolute !important;
          left: 0 !important;
          top: 0 !important;
          bottom: 0 !important;
          width: 4px !important;
          background: linear-gradient(180deg, #52c41a 0%, #fa8c16 100%) !important;
          border-radius: 0 2px 2px 0 !important;
        }
      }
      
      .svg-icon {
        margin-right: 12px !important;
        font-size: 18px !important;
        transition: all 0.3s ease !important;
        color: #595959 !important;
      }
    }

    // menu hover
    .submenu-title-noDropdown,
    .el-submenu__title {
      &:hover {
        background: linear-gradient(135deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.06) 100%) !important;
        color: #1890ff !important;
        transform: translateX(4px) !important;
        box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15) !important;
        
        .svg-icon {
          transform: scale(1.1) !important;
          color: #1890ff !important;
        }
      }
    }

    & .theme-dark .is-active > .el-submenu__title {
      color: #1890ff !important;
    }

    & .nest-menu .el-submenu>.el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $base-sidebar-width !important;
      margin-left: 24px !important;
      height: 48px !important;
      line-height: 48px !important;
      border-radius: 8px !important;
      background: rgba(255, 255, 255, 0.6) !important;
      border: 1px solid rgba(24, 144, 255, 0.05) !important;

      &:hover {
        background: rgba(24, 144, 255, 0.08) !important;
        color: #1890ff !important;
        box-shadow: 0 2px 8px rgba(24, 144, 255, 0.1) !important;
      }
      
      &.is-active {
        background: rgba(24, 144, 255, 0.12) !important;
        color: #1890ff !important;
        font-weight: 500 !important;
        box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15) !important;
      }
    }

    & .theme-dark .nest-menu .el-submenu>.el-submenu__title,
    & .theme-dark .el-submenu .el-menu-item {
      background-color: $base-sub-menu-background !important;

      &:hover {
        background-color: $base-sub-menu-hover !important;
      }
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 54px !important;
    }

    .main-container {
      margin-left: 54px;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      &>.el-submenu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

      }
    }

    .el-menu--collapse {
      .el-submenu {
        &>.el-submenu__title {
          &>span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $base-sidebar-width !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform .28s;
      width: $base-sidebar-width !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$base-sidebar-width, 0, 0);
      }
    }
  }

  .withoutAnimation {

    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
  }

  .nest-menu .el-submenu>.el-submenu__title,
  .el-menu-item {
    &:hover {
      background: linear-gradient(135deg, rgba(24, 144, 255, 0.08) 0%, rgba(24, 144, 255, 0.04) 100%) !important;
      color: #1890ff !important;
    }
  }

  // the scroll bar appears when the subMenu is too long
  >.el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}
